package liurong.driver.specchar;

/**
 * 
 * Unicode 特殊字符 https://graphemica.com/200F
 * 
 * @author liurong
 *
 * @date 2019年2月21日
 */
public class SpecCharTest {

	/**
	 * Unicode "Left-To-Right Mark" (LRM) character.
	 */
	private static final char LRM = '\u200E';

	/*
	 * Unicode "Right-To-Left Mark" (RLM) character.
	 */
	private static final char RLM = '\u200F';

	/*
	 * String representation of LRM
	 */
	private static final String LRM_STRING = Character.toString(LRM);
	/*
	 * String representation of RLM
	 */
	private static final String RLM_STRING = Character.toString(RLM);

	public static void main(String[] args) {
		// System.out.println();

		byte[] bytes = RLM_STRING.getBytes();
		for (byte b : bytes) {
			System.out.print(b);
		}
		System.out.println();
		String email = "‏houdaa5553@gmail.com";
		byte[] bytes2 = email.getBytes();
		for (byte b : bytes2) {
			System.out.print(b);
		}
		String email1 = "houdaa5553@gmail.com";
		System.out.println();
		for (byte b : email1.getBytes()) {
			System.out.print(b);
		}
		
		System.out.println();
		System.out.println(email.equals(email1));
		
//		System.out.println();
//		String newEmail = email.replaceAll(RLM_STRING, "");
//		byte[] bytes3 = newEmail.getBytes();
//		for (byte b : bytes3) {
//			System.out.print(b);
//		}
//
//		System.out.println();
//		System.out.println(email);
//		System.out.println(newEmail);
//
//		System.out.println(email.equals(newEmail));
//		char dash = '\u2021';
//		System.out.println(dash);
	}
}
